package com.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.system.entity.File;
import com.baomidou.mybatisplus.extension.service.IService;
import com.system.vo.request.FilePageReqVO;
import com.system.vo.response.PageVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author XueHeng
 * @since 2020-09-17
 */
public interface FileService extends IService<File> {

    /*
    获取所有文件信息（分页）
     */
    public PageVO<File> selectAll(FilePageReqVO vo);

    /*
    下载文件
     */
    public void download(HttpServletResponse response,String fileId);

    /*
    上传文件
     */
    public String upload(MultipartFile file, String userId,Integer type);

    /*
    删除文件
     */
    public void delete(List<String> fileUrl);
}
